package com.fantabest.common;

import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public final class EMF {
    private static EntityManagerFactory emfInstance = null;

    private EMF() {}

    public static EntityManagerFactory getInstance() {
    	if(emfInstance == null)	{
    		emfInstance = Persistence.createEntityManagerFactory("transactions-optional");
    	}
        return emfInstance;
    }
}
